<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table>
        <tr>
            <th>编号</th>
            <th>作者</th>
            <th>书名</th>
            <th>价格</th>
        </tr>
    </table>
</body>
</html>

<?php
    $book=[
        ["id"=>1,"auhtor"=>"zhangsan","bookName"=>"html5","price"=>"35"],
        ["id"=>2,"auhtor"=>"lisi","bookName"=>"css","price"=>"50"],
        ["id"=>2,"auhtor"=>"wangwu","bookName"=>"php","price"=>"60"],
    ];
    if(!empty($_post['name'])){
        $authotName=$_POST['name'];
        $books=array_filter($books,function($v){
            return $v;
        })
    }
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="" method="post">
        <input type="text" placeholder="请输入作者" name='name'>
        <input type="submit" value="查询">
    </form>
<table>
        <tr>
            <th>编号</th>
            <th>作者</th>
            <th>书名</th>
            <th>价格</th>
        </tr>
        <?php
            foreach($book as $value){?>
            <tr>
                <td><?php echo $value['id'];?></td>
                <td><?php echo $value['auhtor'];?></td>
                <td><?php echo $value['bookName'];?></td>
                <td><?php echo $value['price'];?></td>
            </tr>
        ?>
    </table>
</body>
</html>